﻿using Newtonsoft.Json.Linq;

namespace NetEasyMusic.Lib.Models;

public class VideoModel
{
    public VideoModel()
    {
    }

    public VideoModel(JToken token)
    {
        PicUrl = token["data"]?["coverUrl"]?.ToObject<string>()!;
        Title = token["data"]?["title"]?.ToObject<string>()!;
        Description = token["data"]?["description"]?.ToObject<string>()!;
        Id = token["data"]?["urlInfo"]?["id"]?.ToObject<string>()!;
        Url = token["data"]?["urlInfo"]?["url"]?.ToObject<string>()!;
    }

    public string Id { get; set; } = "";
    public string Title { get; set; } = "";
    public string Description { get; set; } = "";
    public string PicUrl { get; set; } = "";
    public string Url { get; set; } = "";
}